package cn.jhc.service.impl;

import cn.jhc.dao.BookDAO;
import cn.jhc.entity.Book;
import cn.jhc.service.BookService;

import java.util.List;

public class BookServiceImpl implements BookService {
    private BookDAO bookDAO;

    public BookDAO getBookDAO() {
        return bookDAO;
    }

    public void setBookDAO(BookDAO bookDAO) {
        this.bookDAO = bookDAO;
    }


    @Override
    public int save(Book book) {
        return bookDAO.save(book);
    }

    @Override
    public int update(Book book) {
        return bookDAO.update(book);
    }

    @Override
    public int delete(Integer bookId) {
        return bookDAO.delete(bookId);
    }

    @Override
    public Book queryOne(Integer bookId) {
        return bookDAO.queryOne(bookId);
    }

    @Override
    public List<Book> query(Book book) {
        return bookDAO.query(book);
    }

    @Override
    public Book findBookItems(Integer bookId) {
        return bookDAO.findBookItems(bookId);
    }
}
